﻿using App.Chat.Contract;
using App.Chat.Hubs;
using Zws.Frameworker.Filter;
using Zws.Frameworker.Module;

namespace App.Chat
{
    public class AppModule : ModuleMark
    {
        public void OnBuilderExec(WebApplicationBuilder builder)
        {
            builder.Services.AddControllersWithViews(options =>
            {
                options.Filters.Add<ApiResultFilter>();
            });
            builder.Services.AddHttpContextAccessor();
            builder.Services.AddScoped<CurrentUser>();
        }
    }
}
